/**
 * 
 */
package com.rover022.webgame;

import org.puremvc.java.patterns.facade.Facade;

import com.rover022.webgame.controller.StartupCommand;

/**
 * @author chenbin01
 * @category Flash web game
 * @since 2010.3.8
 * @version  1.0
 */
public class ApplicationFacade extends Facade {

	/**
	 * 
	 */
	public static final String STARTUP = "startup";
	public static final String LOGIN = "login";
	public static final String SUBMIT_LOGIN = "submitLogin";
	public static final String LOGIN_SUCCESSFUL = "loginSuccessful";
	public static final String LOGIN_FAIL = "loginFail";

	private static ApplicationFacade instance = null;

	public ApplicationFacade() {
		// TODO Auto-generated constructor stub
	}

	public static ApplicationFacade getInst() {
		if (instance == null) {
			instance = new ApplicationFacade();
		}
		return instance;
	}

	protected void initializeController() {
		super.initializeController();
		registerCommand(STARTUP, StartupCommand.class);
		// registerCommand(SUBMIT_LOGIN, ProcessLogin.class);
	}

	public void startup() {
		// this.midlet = midlet;
		// notifyObservers(new Notification(STARTUP, null, null));
	}

}
